<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" method="post" action="<?php echo U($module_name.'/'.$action_name."?model=".$model);?>">
    <input type="hidden" name="pageNum" value="<?php echo ($pageNum); ?>" /><input type="hidden" name="numPerPage" value="<?php echo ($numPerPage); ?>" /><input type="hidden" name="orderField" value="<?php echo ($orderField); ?>" /><input type="hidden" name="orderDirection" value="<?php echo ($orderDirection); ?>" />
</form>
<div class="pageHeader">
    <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo U($module_name.'/'.$action_name);?>" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li style="width:200px;">
				<label style="width: 50px;">关键字：</label>
				<input type="text" name="keywords" value="<?php echo ($keywords); ?>"/>
				</li>
				<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" <?php if($sfied=='all') : ?>selected="selected"<?php endif;?>>全部</option>
				<option value="name" <?php if($sfied=='name') : ?>selected="selected"<?php endif;?>>名称</option>
				<option value="id" <?php if($sfied=='id') : ?>selected="selected"<?php endif;?>>ID</option>
				<option value="code" <?php if($sfied=='code') : ?>selected="selected"<?php endif;?>>编号</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,name,code" />
			</li>
				<li style="width:100px;">
                    <select name="mname">
                        <option value="">请选择模型</option>
                        <option value="sj" <?php if($condition['mname'] == 'sj') : ?>  selected=selected <?php endif;?>>手机</option>
                        <option value="pb" <?php if($condition['mname'] == 'pb') : ?>  selected=selected <?php endif;?>>平板</option>
                        <option value="pj" <?php if($condition['mname'] == 'pj') : ?>  selected=selected <?php endif;?>>配件</option>
                        <option value="sp" <?php if($condition['mname'] == 'sp') : ?>  selected=selected <?php endif;?>>饰品</option>
                        <option value="lh" <?php if($condition['mname'] == 'lh') : ?>  selected=selected <?php endif;?>>靓号</option>
                        <option value="hmpf" <?php if($condition['mname'] == 'hmpf') : ?>  selected=selected <?php endif;?>>靓号批发</option>
                    </select>
                </li>
                <li style="width:120px;">
                    <select name="suppliers">
                        <option value="">请选择供应商</option>
                        <?php if(is_array($suppliers)): $i = 0; $__LIST__ = $suppliers;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$s): $mod = ($i % 2 );++$i;?><option value="<?php echo ($s['id']); ?>" <?php if($condition['suppliers'] == $s['id']) : ?>  selected=selected <?php endif;?>><?php echo ($s['name']); ?> </option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                </li>
                <li style="width:120px;">
                    <select name="brand">
                        <option value="">请选择品牌</option>
                        <?php if(is_array($brand)): $i = 0; $__LIST__ = $brand;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$b): $mod = ($i % 2 );++$i;?><option value="<?php echo ($b['id']); ?>" <?php if($condition['brand'] == $b['id']) : ?>  selected=selected <?php endif;?>><?php echo ($b['name']); ?> </option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                </li>
                <li style="width:80px;">
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">
                                搜索
                            </button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="edit" href="<?php echo U('Price/edit');?>" target="dialog" width="500" height="200"><span>Excel价格导入</span></a></li>
            <li><a class="edit selectedDo" href="<?php echo U('Price/out');?>" warn="请选择至少选择一个产品" target="dialog" data="ids[]" width="600" height="200" rel="dsadsasd"><span>Excel价格导出</span></a></li>
        </ul>
    </div>
    <div id="w_list_print">
        <table class="list" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="94">
            <thead>
            <tr>
                <th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th><th width="40" orderField="id" <?php if($orderField=='id') : ?>class="<?php echo ($orderDirection); ?>"<?php endif;?>> ID</th>
                <th>名称</th>
                <th>模型</th>
                <th>起批数</th>
                <th>全国连锁价</th>
                <th>省价</th>
                <th>市价</th>
                <th>区价</th>
                <th>状态</th>
                <th>修改时间</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr target="sid_dv" rel="<?php echo ($vo['id']); ?>">
                <td><input name="ids[]" value="<?php echo ($vo['id']); ?>" type="checkbox"></td><td align="center"><?php echo ($vo['id']); ?></td>
                <td><?php echo ($vo['name']); ?></td>
                <td><?php echo ($vo['mname']); ?></td>
                <td><?php echo ($price[$vo['id']]['minsale']); ?></td>
                <td>
                    <?php echo $price[$vo['id']]['jiayi'] * 0.01 ?>
                </td>
                <td>
                    <?php echo $price[$vo['id']]['jiaer'] * 0.01 ?>
                </td>
                <td>
                    <?php echo $price[$vo['id']]['jiasan'] * 0.01 ?>
                </td>
                <td>
                    <?php echo $price[$vo['id']]['jiasi'] * 0.01 ?>
                </td>
                <td><?php echo ($vo['status']); ?></td>
                <td><?php echo (date("Y-m-d H:i:s",$price[$vo['id']]['ctime'])); ?></td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
        </table>
    </div>
<div class="panelBar">
	<div class="pages">
		<span>显示</span>
		<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			<option value="20" <?php if($numPerPage==20) : ?>selected="selected"<?php endif;?>>20</option>
			<option value="50" <?php if($numPerPage==50) : ?>selected="selected"<?php endif;?>>50</option>
			<option value="66" <?php if($numPerPage==66) : ?>selected="selected"<?php endif;?>>66</option>
			<option value="100" <?php if($numPerPage==100) : ?>selected="selected"<?php endif;?>>100</option>
			<option value="200" <?php if($numPerPage==200) : ?>selected="selected"<?php endif;?>>200</option>
			<option value="500" <?php if($numPerPage==500) : ?>selected="selected"<?php endif;?>>500</option>
		</select>
		<span>条，共<?php echo ($totalCount); ?>条</span>
	</div>
	
	<div class="pagination" targetType="navTab" totalCount="<?php echo ($totalCount); ?>" numPerPage="<?php echo ($numPerPage); ?>" pageNumShown="10" currentPage="<?php echo ($pageNum); ?>"></div>
</div>
</div>